using System;
using System.Data;

namespace Common.Database
{
    /// <summary>
    /// 
    /// </summary>
    public interface IAgent
    {
        /// <summary></summary>
        void Connect();
        /// <summary></summary>
        void BeginTransaction();
        /// <summary></summary>
        IDataReader GetReader(string strSqlString);
        /// <summary></summary>
        IDataReader GetReader(string strSqlString, bool blnRetriveSchema);
        /// <summary></summary>
        DataSet GetDataSet(string strTableName, IDbDataAdapter objAdapter, int intStartRecord, int intMaxRecords);
        /// <summary></summary>
        IDbDataAdapter GetAdapter(string strSqlString, bool blnUpdatable);
        /// <summary></summary>
        void Execute(string strSqlString);
        /// <summary></summary>
        string GetSafeObjectName(string strObjectName);
        /// <summary></summary>
        void DeleteObject(string strObjectType, string strObjectName);
        /// <summary></summary>
        void RenameObject(string strObjectType, string strOldObjectName, string strNewObjectName);
        /// <summary></summary>
        void RollbackTransaction();
        /// <summary></summary>
        void CommitTransaction();
        /// <summary></summary>
        void Disconnect();
    }
}
